
#ifndef GENERALSOCK_H
#define GENERALSOCK_H



#ifdef _WIN32
#include <winsock2.h>
#include <ws2tcpip.h>

#pragma comment (lib, "Ws2_32.lib")

#define close closesocket

#define SOCKETINIT WSADATA wsaData;\
    if (WSAStartup(MAKEWORD(2,1),&wsaData))\
        WSACleanup();
#define SOCKETFINISH WSACleanup();


#else  //Not _WIN32

#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>

#define SOCKETINIT
#define SOCKETFINISH

#endif //_WIN32














#endif  //GENERALSOCK_H